#include <stdio.h>
#include "transaction.h"
#include "defines.h"
#include "cache.h"
#include "globals.h"
//**************************Training TABLES *****************************
class training_entry_t
{
public:
	long long addr;
	int second_miss;
	int distance;  //Stride Distance between misses
	int direction;  //1 if forward, -1 if backward
	long long cycle_accessed;   //Note the cycle at which this train was accessed.
	long long end_addr;
	
	training_entry_t()
	{
		addr = 0;
		second_miss = false;
		distance = 0;
		direction = 0;
		cycle_accessed = 0;
		end_addr = 0;
	}	
	
};
                                                         //******************
class training_table_t
{
public:
	std::vector<training_entry_t> training_entries;	
	int no_of_entries;
	
	training_table_t()
	{
		training_entries.clear();	
		no_of_entries = 0;
	}
};

//**************************STREAM TABLES *****************************
class stream_entry_t
{
public:
	long long addr;	//Original miss address
		
	int distance;  //Stride Distance between misses
	int direction;  //1 if forward, -1 if backward
	long long  cycle_accessed;   //Note the cycle at which this train was accessed.
	int repeat;  //If stream repeated, then this flag is set.
	
	long long end_addr;
	

	long long sent_start;
	long long sent_end;

	stream_entry_t()
	{
		addr = 0;
		distance = 0;
		direction = 0;
		cycle_accessed = 0;
		repeat = false;
		end_addr = 0;
	}	
	
};
														//******************
class stream_table_t
{
public:
	std::vector<stream_entry_t> stream_entries;
	int no_of_entries;
	
	stream_table_t()
	{
		stream_entries.clear();	
		no_of_entries = 0;
	}
};

//**************************Other functions*************************

